package com.dapeis.core.utils.json;

import java.lang.reflect.Type;

import com.ag.module.common.plugin.sms.SmsSendRequest;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;

public class SMSRequestGsonAdapter implements JsonSerializer<SmsSendRequest> {

    @Override
    public JsonElement serialize(SmsSendRequest src, Type typeOfSrc,
	    JsonSerializationContext context) {
	JsonObject json = new JsonObject();
	json.addProperty("account", src.getAccount());
	json.addProperty("password", src.getPassword());
	json.addProperty("msg", src.getMsg());
	json.addProperty("phone", src.getPhone());
	json.addProperty("report", src.getReport());
	return json;
    }

}
